Prevention and resolution of a critical shortage of a shared resource in a multi-image operating system environment

ABSTRACT

A technique relates to resource allocation of a countable managed resource. A computer sets a reserved amount of the managed resource to be available for a privileged status, such that there is an unreserved amount of the managed resource to be available for a non-privileged status. In response to a non-privileged job needing more of the unreserved amount of the managed resource than what is available, it is determined whether the non-privileged job is promotable to the privileged status. In response to the non-privileged job not being promotable to the privileged status, the non-privileged job is prevented from accessing the reserved amount of the managed resource. In response to the non-privileged job being promotable to the privileged status, the non-privileged job is permitted to utilize the reserved amount of the managed resource.

BACKGROUND

The present invention generally relates to computer systems, and morespecifically, to prevention and resolution of a critical shortage of ashared resource in a multi-image operating system environment.

An operating system (OS) is system software that manages computerhardware and software resources and provides common services forcomputer programs. All computer programs, excluding firmware, require anoperating system to function. Time-sharing operating systems scheduletasks/jobs for efficient use of the system and may also includeaccounting software for cost allocation of processor time, mass storage,printing, and other resources. For hardware functions such as input andoutput and memory allocation, the operating system acts as anintermediary between programs and the computer hardware, although theapplication code is usually executed directly by the hardware andfrequently makes system calls to an operating system function or isinterrupted by it. Operating systems are found on many devices thatcontain a computer, from cellular phones and video game consoles to webservers and supercomputers.

In computing, a shared resource, or network share, is a computerresource made available from one host to other hosts on a computernetwork. A shared resource is a device or piece of information on acomputer that can be remotely accessed from another computer, typicallyvia a local area network or an enterprise intranet, transparently as ifit were a resource in the local machine. Network sharing is madepossible by inter-process communication over the network. Some examplesof shareable resources are computer programs, data, storage devices, andprinters. The shared resource can be called a shared disk (also known asmounted disk), shared drive volume, shared folder, shared file, etc.

Cooperative memory management, used by many early operating systems,assumes that all programs make voluntary use of the kernel's memorymanager, and do not exceed their allocated memory. This system of memorymanagement is almost never seen anymore since programs often containbugs which can cause them to exceed their allocated memory. If a programfails, it may cause memory used by one or more other programs to beaffected or overwritten.

Memory protection enables the kernel to limit access of a process to thecomputer's memory. Various methods of memory protection exist, includingmemory segmentation and paging. All methods require some level ofhardware support. In both segmentation and paging, certain protectedmode registers specify to the central processing unit (CPU) what memoryaddress it should allow a running program to access. Attempts to accessother addresses trigger an interrupt which causes the CPU to re-entersupervisor mode, placing the kernel in charge. This is called asegmentation violation, and since it is both difficult to assign ameaningful result to such an operation, and because it is usually a signof a misbehaving program, the kernel generally resorts to terminatingthe offending program and reports the error.

SUMMARY

Embodiments of the present invention are directed to acomputer-implemented method for resource allocation of a typicallycountable (or, more generally, quantifiable) managed resource. Anon-limiting example of the computer-implemented method includessetting, by a computer, a reserved amount of the managed resource to beavailable for a privileged status, such that there is an unreservedamount of the managed resource to be available for a non-privilegedstatus, and in response to a non-privileged job needing more of theunreserved amount of the managed resource than what is available,determining whether the non-privileged job is promotable to theprivileged status. The method includes in response to the non-privilegedjob not being promotable to the privileged status, preventing thenon-privileged job from accessing the reserved amount of the managedresource, and in response to the non-privileged job being promotable tothe privileged status, permitting the non-privileged job to utilize thereserved amount of the managed resource.

Embodiments of the present invention are directed to a system forresource allocation of a countable managed resource. A non-limitingexample of the system includes processing circuit and a storage mediumreadable by the processing circuit and storing instructions that, whenexecuted by the processing circuit, cause the processing circuitry toperform a method. The method includes setting, by the processingcircuit, a reserved amount of the managed resource to be available for aprivileged status, such that there is an unreserved amount of themanaged resource to be available for a non-privileged status, and inresponse to a non-privileged job needing more of the unreserved amountof the managed resource than what is available, determining whether thenon-privileged job is promotable to the privileged status. The methodincludes in response to the non-privileged job not being promotable tothe privileged status, preventing the non-privileged job from accessingthe reserved amount of the managed resource, and in response to thenon-privileged job being promotable to the privileged status, permittingthe non-privileged job to utilize the reserved amount of the managedresource.

Embodiments of the invention are directed to a computer program productfor resource allocation of a countable managed resource, the computerprogram product comprising a computer readable storage medium havingprogram instructions embodied therewith, where the computer readablestorage medium is not a transitory signal per se. The programinstructions are readable by a computer system to cause the computersystem to perform a method. A non-limiting example of the methodincludes setting, by the computer, a reserved amount of the managedresource to be available for a privileged status, such that there is anunreserved amount of the managed resource to be available for anon-privileged status, and in response to a non-privileged job needingmore of the unreserved amount of the managed resource than what isavailable, determining whether the non-privileged job is promotable tothe privileged status. The method includes in response to thenon-privileged job not being promotable to the privileged status,preventing the non-privileged job from accessing the reserved amount ofthe managed resource, and in response to the non-privileged job beingpromotable to the privileged status, permitting the non-privileged jobto utilize the reserved amount of the managed resource.

Additional technical features and benefits are realized through thetechniques of the present invention. Embodiments and aspects of theinvention are described in detail herein and are considered a part ofthe claimed subject matter. For a better understanding, refer to thedetailed description and to the drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

The specifics of the exclusive rights described herein are particularlypointed out and distinctly claimed in the claims at the conclusion ofthe specification. The foregoing and other features and advantages ofthe embodiments of the invention are apparent from the followingdetailed description taken in conjunction with the accompanying drawingsin which:

FIG. 1 depicts a cloud computing environment according to an embodimentof the present invention;

FIG. 2 depicts abstraction model layers according to an embodiment ofthe present invention;

FIG. 3 depicts a schematic of an example of a cloud computing nodeaccording to embodiments of the present invention;

FIG. 4 depicts a simplified view of the memory in computer system/serveraccording to embodiments of the present invention;

FIG. 5 depicts example contents of a managed resources softwareapplication according to embodiments of the present invention;

FIG. 6 depicts example functions of managed resource softwareapplication according to embodiments of the present invention;

FIGS. 7A, 7B, and 7C depict example operations to integrate a privilegedresource protection mechanism according to embodiments of the presentinvention;

FIG. 8 depicts a high-level diagram of individually protecting variousmanaged resources according to embodiments of the present invention; and

FIG. 9 is a flow chart of a computer-implemented method for resourceallocation of a managed resource according to embodiments of the presentinvention.

The diagrams depicted herein are illustrative. There can be manyvariations to the diagram or the operations described therein withoutdeparting from the spirit of the invention. For instance, the actionscan be performed in a differing order or actions can be added, deletedor modified. Also, the term “coupled” and variations thereof describeshaving a communications path between two elements and does not imply adirect connection between the elements with no interveningelements/connections between them. All of these variations areconsidered a part of the specification.

In the accompanying figures and following detailed description of thedisclosed embodiments, the various elements illustrated in the figuresare provided with two or three digit reference numbers. With minorexceptions, the leftmost digit(s) of each reference number correspondsto the figure in which its element is first illustrated.

DETAILED DESCRIPTION

Various embodiments of the invention are described herein with referenceto the related drawings. Alternative embodiments of the invention can bedevised without departing from the scope of this invention. Variousconnections and positional relationships (e.g., over, below, adjacent,etc.) are set forth between elements in the following description and inthe drawings. These connections and/or positional relationships, unlessspecified otherwise, can be direct or indirect, and the presentinvention is not intended to be limiting in this respect. Accordingly, acoupling of entities can refer to either a direct or an indirectcoupling, and a positional relationship between entities can be a director indirect positional relationship. Moreover, the various tasks andprocess steps described herein can be incorporated into a morecomprehensive procedure or process having additional steps orfunctionality not described in detail herein.

The following definitions and abbreviations are to be used for theinterpretation of the claims and the specification. As used herein, theterms “comprises,” “comprising,” “includes,” “including,” “has,”“having,” “contains” or “containing,” or any other variation thereof,are intended to cover a non-exclusive inclusion. For example, acomposition, a mixture, process, method, article, or apparatus thatcomprises a list of elements is not necessarily limited to only thoseelements but can include other elements not expressly listed or inherentto such composition, mixture, process, method, article, or apparatus.

Additionally, the term “exemplary” is used herein to mean “serving as anexample, instance or illustration.” Any embodiment or design describedherein as “exemplary” is not necessarily to be construed as preferred oradvantageous over other embodiments or designs. The terms “at least one”and “one or more” may be understood to include any integer numbergreater than or equal to one, i.e. one, two, three, four, etc. The terms“a plurality” may be understood to include any integer number greaterthan or equal to two, i.e. two, three, four, five, etc. The term“connection” may include both an indirect “connection” and a direct“connection.”

The terms “about,” “substantially,” “approximately,” and variationsthereof, are intended to include the degree of error associated withmeasurement of the particular quantity based upon the equipmentavailable at the time of filing the application. For example, “about”can include a range of ±8% or 5%, or 2% of a given value.

For the sake of brevity, conventional techniques related to making andusing aspects of the invention may or may not be described in detailherein. In particular, various aspects of computing systems and specificcomputer programs to implement the various technical features describedherein are well known. Accordingly, in the interest of brevity, manyconventional implementation details are only mentioned briefly herein orare omitted entirely without providing the well-known system and/orprocess details.

It is to be understood that although this disclosure includes a detaileddescription on cloud computing, implementation of the teachings recitedherein are not limited to a cloud computing environment. Rather,embodiments of the present invention are capable of being implemented inconjunction with any other type of computing environment now known orlater developed.

Cloud computing is a model of service delivery for enabling convenient,on-demand network access to a shared pool of configurable computingresources (e.g., networks, network bandwidth, servers, processing,memory, storage, applications, virtual machines, and services) that canbe rapidly provisioned and released with minimal management effort orinteraction with a provider of the service. This cloud model may includeat least five characteristics, at least three service models, and atleast four deployment models.

Characteristics are as follows:

On-demand self-service: a cloud consumer can unilaterally provisioncomputing capabilities, such as server time and network storage, asneeded automatically without requiring human interaction with theservice's provider.

Broad network access: capabilities are available over a network andaccessed through standard mechanisms that promote use by heterogeneousthin or thick client platforms (e.g., mobile phones, laptops, and PDAs).

Resource pooling: the provider's computing resources are pooled to servemultiple consumers using a multi-tenant model, with different physicaland virtual resources dynamically assigned and reassigned according todemand. There is a sense of location independence in that the consumergenerally has no control or knowledge over the exact location of theprovided resources but may be able to specify location at a higher levelof abstraction (e.g., country, state, or datacenter).

Rapid elasticity: capabilities can be rapidly and elasticallyprovisioned, in some cases automatically, to quickly scale out andrapidly released to quickly scale in. To the consumer, the capabilitiesavailable for provisioning often appear to be unlimited and can bepurchased in any quantity at any time.

Measured service: cloud systems automatically control and optimizeresource use by leveraging a metering capability at some level ofabstraction appropriate to the type of service (e.g., storage,processing, bandwidth, and active user accounts). Resource usage can bemonitored, controlled, and reported, providing transparency for both theprovider and consumer of the utilized service.

Service Models are as follows:

Software as a Service (SaaS): the capability provided to the consumer isto use the provider's applications running on a cloud infrastructure.The applications are accessible from various client devices through athin client interface such as a web browser (e.g., web-based e-mail).The consumer does not manage or control the underlying cloudinfrastructure including network, servers, operating systems, storage,or even individual application capabilities, with the possible exceptionof limited user-specific application configuration settings.

Platform as a Service (PaaS): the capability provided to the consumer isto deploy onto the cloud infrastructure consumer-created or acquiredapplications created using programming languages and tools supported bythe provider. The consumer does not manage or control the underlyingcloud infrastructure including networks, servers, operating systems, orstorage, but has control over the deployed applications and possiblyapplication hosting environment configurations.

Infrastructure as a Service (IaaS): the capability provided to theconsumer is to provision processing, storage, networks, and otherfundamental computing resources where the consumer is able to deploy andrun arbitrary software, which can include operating systems andapplications. The consumer does not manage or control the underlyingcloud infrastructure but has control over operating systems, storage,deployed applications, and possibly limited control of select networkingcomponents (e.g., host firewalls).

Deployment Models are as follows:

Private cloud: the cloud infrastructure is operated solely for anorganization. It may be managed by the organization or a third party andmay exist on-premises or off-premises.

Community cloud: the cloud infrastructure is shared by severalorganizations and supports a specific community that has shared concerns(e.g., mission, security requirements, policy, and complianceconsiderations). It may be managed by the organizations or a third partyand may exist on-premises or off-premises.

Public cloud: the cloud infrastructure is made available to the generalpublic or a large industry group and is owned by an organization sellingcloud services.

Hybrid cloud: the cloud infrastructure is a composition of two or moreclouds (private, community, or public) that remain unique entities butare bound together by standardized or proprietary technology thatenables data and application portability (e.g., cloud bursting forload-balancing between clouds).

A cloud computing environment is service oriented with a focus onstatelessness, low coupling, modularity, and semantic interoperability.At the heart of cloud computing is an infrastructure that includes anetwork of interconnected nodes.

Referring now to FIG. 1, illustrative cloud computing environment 50 isdepicted. As shown, cloud computing environment 50 includes one or morecloud computing nodes 10 with which local computing devices used bycloud consumers, such as, for example, personal digital assistant (PDA)or cellular telephone 54A, desktop computer 54B, laptop computer 54C,and/or automobile computer system 54N may communicate. Nodes 10 maycommunicate with one another. They may be grouped (not shown) physicallyor virtually, in one or more networks, such as Private, Community,Public, or Hybrid clouds as described hereinabove, or a combinationthereof. This allows cloud computing environment 50 to offerinfrastructure, platforms and/or software as services for which a cloudconsumer does not need to maintain resources on a local computingdevice. It is understood that the types of computing devices 54A-N shownin FIG. 1 are intended to be illustrative only and that computing nodes10 and cloud computing environment 50 can communicate with any type ofcomputerized device over any type of network and/or network addressableconnection (e.g., using a web browser).

Referring now to FIG. 2, a set of functional abstraction layers providedby cloud computing environment 50 (FIG. 1) is shown. It should beunderstood in advance that the components, layers, and functions shownin FIG. 2 are intended to be illustrative only and embodiments of theinvention are not limited thereto. As depicted, the following layers andcorresponding functions are provided:

Hardware and software layer 60 includes hardware and softwarecomponents. Examples of hardware components include: mainframes 61; RISC(Reduced Instruction Set Computer) architecture based servers 62;servers 63; blade servers 64; storage devices 65; and networks andnetworking components 66. In some embodiments, software componentsinclude network application server software 67 and database software 68.

Virtualization layer 70 provides an abstraction layer from which thefollowing examples of virtual entities may be provided: virtual servers71; virtual storage 72; virtual networks 73, including virtual privatenetworks; virtual applications and operating systems 74; and virtualclients 75.

In one example, management layer 80 may provide the functions describedbelow. Resource provisioning 81 provides dynamic procurement ofcomputing resources and other resources that are utilized to performtasks within the cloud computing environment. Metering and Pricing 82provide cost tracking as resources are utilized within the cloudcomputing environment, and billing or invoicing for consumption of theseresources. In one example, these resources may include applicationsoftware licenses. Security provides identity verification for cloudconsumers and tasks, as well as protection for data and other resources.User portal 83 provides access to the cloud computing environment forconsumers and system administrators. Service level management 84provides cloud computing resource allocation and management such thatrequired service levels are met. Service Level Agreement (SLA) planningand fulfillment 85 provides pre-arrangement for, and procurement of,cloud computing resources for which a future requirement is anticipatedin accordance with an SLA.

Workloads layer 90 provides examples of functionality for which thecloud computing environment may be utilized. Examples of workloads andfunctions which may be provided from this layer include: mapping andnavigation 91; software development and lifecycle management 92; virtualclassroom education delivery 93; data analytics processing 94;transaction processing 95; and software application 96.

Turning now to an overview of technologies that are more specificallyrelevant to aspects of the invention, an age old problem for operatingsystems is how to deal with a critical shortage of a resource. Examplesof causes of a critical shortage include the application programmingerror that results in a loop consuming a resource, a runaway system taskconsuming and never freeing a resource, etc. Various analysis methodsexist for identifying jobs using an excessive amount resource. Afteranalysis, the misbehaving job(s) can be purged from the system therebyfreeing up the needed resource. However, the process of analysis andcleanup may itself require some quantity of an already depletedresource. This potentially creates a deadlock situation.

It is now assumed that the resource in question is countable such thatthere is a defined number of entities that constitute a resource. Forexample, a countable resource (or quantifiable resource) can be a numberof allocation blocks in a file system or a number of control structureswhich can be used. In order to allow resource shortage resolution, someamount of resource is reserved and is only available in an emergency fora special “privileged” type of users. The privileged user typically isgiven special security credentials to perform necessary cleanup tasks.Only privileged users can use the reserved resource. One method ofreserving a part of the resource for privileged users involves markingor pooling. However, there are several problems with marking or poolingthe resource. 1) Each resource is different and the process of markingor pooling will probably differ, so the resource management logic doesnot lend itself to generalization. 2) Having some parts of the resourcemarked “privileged” requires that all code dealing with the resource iscognizant of differences in behavior of “privileged” parts of theresource versus parts that are not privileged. This makes it difficultto locate and update all code paths when adding this logic. 3)Additional problems arise when different code levels (new code andlegacy code) can coexist in a multisystem cluster that shares theresource. The code at each level must be able to handle resource markingor pooling. This creates change management challenges.

Turning now to an overview of the aspects of the invention, one or moreembodiments of the invention address the above-described shortcomings ofthe prior art by providing a methodology of resource management that isdesigned to provide an environment for a guaranteed resolution of aresource shortage and address the disadvantages of other approaches. Theapproach can be used for any countable resource in both operatingsystems and applications.

An additional aspect of the invention addressed the shortcomings of theprior art by providing a mechanism to promote some non-privileged jobsto utilize reserved/privileged part of the resource. Once a privilegeduser determines the offending job(s), the offending jobs must be purgedfrom the system. However, the process of purging a job may require someamount of the managed resource. The resource management logic isconfigured to recognize this scenario and temporarily promote suchnon-privileged job to the privileged status to allow the job to obtainthe necessary amount of the resource thereby allowing the job to bepurged and return the needed resource.

The managed resource is to be countable. However, the resourcemanagement logic is configured to tolerate scenarios when the resourcecount is not precise and/or is corrupted due to unforeseen abnormalterminations or a number of other reasons. In such situations where theresource count is not precise or has been corrupted, the resource countcan be recalculated. The resource counting (privileged count) should befault tolerant (i.e., fuzzy) with a bias towards privileged part of theresource.

Turning now to a more detailed description of aspects of the presentinvention, FIG. 3 depicts a schematic of an example of a cloud computingnode according to embodiments of the present invention. Cloud computingnode 10 is only one example of a suitable cloud computing node and isnot intended to suggest any limitation as to the scope of use orfunctionality of embodiments of the invention described herein.

Regardless, cloud computing node 10 is capable of being implementedand/or performing any of the functionality set forth hereinabove. Incloud computing node 10 there is a computer system/server 12, which isoperational with numerous other general purpose or special purposecomputing system environments or configurations.

Examples of well-known computing systems, environments, and/orconfigurations that may be suitable for use with computer system/server12 include, but are not limited to, personal computer systems, servercomputer systems, thin clients, thick clients, hand-held or laptopdevices, multiprocessor systems, microprocessor-based systems, set topboxes, programmable consumer electronics, network PCs, minicomputersystems, mainframe computer systems, and distributed cloud computingenvironments that include any of the above systems or devices, and thelike.

Computer system/server 12 may be described in the general context ofcomputer system-executable instructions, such as program modules, beingexecuted by a computer system. Generally, program modules may includeroutines, programs, objects, components, logic, data structures, and soon that perform particular tasks or implement particular abstract datatypes. Computer system/server 12 may be practiced in distributed cloudcomputing environments where tasks are performed by remote processingdevices that are linked through a communications network. In adistributed cloud computing environment, program modules may be locatedin both local and remote computer system storage media including memorystorage devices.

As shown in FIG. 3, computer system/server 12 in cloud computing node 10is shown in the form of a general-purpose computing device. Thecomponents of computer system/server 12 may include, but are not limitedto, one or more processors or processing units 16, a system memory 28,and a bus 18 that couples various system components including systemmemory 28 to processor 16. Bus 18 represents one or more of any ofseveral types of bus structures, including a memory bus or memorycontroller, a peripheral bus, an accelerated graphics port, and aprocessor or local bus using any of a variety of bus architectures. Byway of example, and not limitation, such architectures include IndustryStandard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus,Enhanced ISA (EISA) bus, Video Electronics Standards Association (VESA)local bus, and Peripheral Component Interconnects (PCI) bus.

Computer system/server 12 typically includes a variety of computersystem readable media. Such media may be any available media that isaccessible by computer system/server 12, and it includes both volatileand non-volatile media, removable and non-removable media. The systemmemory 28 can include computer system readable media in the form ofvolatile memory, such as random access memory (RAM) 30 and/or cachememory 32. Computer system/server 12 may further include otherremovable/non-removable, volatile/non-volatile computer system storagemedia. By way of example only, storage system 34 can be provided forreading from and writing to a nonremovable, non-volatile magnetic media(not shown and typically called a “hard drive”). Although not shown, amagnetic disk drive for reading from and writing to a removable,non-volatile magnetic disk (e.g., a “floppy disk”), and an optical diskdrive for reading from or writing to a removable, non-volatile opticaldisk such as a CD-ROM, DVD-ROM or other optical media can be provided.In such instances, each can be connected to bus 18 by one or more datamedia interfaces. Memory 28 may include at least one program producthaving a set (e.g., at least one) of program modules that are configuredto carry out the functions of embodiments of the invention.

Program/utility 40, having a set (at least one) of program modules 42,may be stored in memory 28 by way of example, and not limitation, aswell as an operating system, one or more application programs, otherprogram modules, and program data. Each of the operating system, one ormore application programs, other program modules, and program data orsome combination thereof, may include an implementation of a networkingenvironment. Program modules 42 generally carry out the functions and/ormethodologies of embodiments of the invention as described herein.

Computer system/server 12 may also communicate with one or more externaldevices 14 such as a keyboard, a pointing device, a display 24, etc.;one or more devices that enable a user to interact with computersystem/server 12; and/or any devices (e.g., network card, modem, etc.)that enable computer system/server 12 to communicate with one or moreother computing devices. Such communication can occur via Input/Output(I/O) interfaces 22. Still yet, computer system/server 12 cancommunicate with one or more networks such as a local area network(LAN), a general wide area network (WAN), and/or a public network (e.g.,the Internet) via network adapter 20. As depicted, network adapter 20communicates with the other components of computer system/server 12 viabus 18. It should be understood that although not shown, other hardwareand/or software components could be used in conjunction with computersystem/server 12. Examples, include, but are not limited to: microcode,device drivers, redundant processing units, external disk drive arrays,RAID systems, tape drives, and data archival storage systems, etc.

Further, the computer system/server 12 may include, be integrated with,and/or be coupled to elements in hardware and software layer 60,virtualization layer 70, management layer 80, and workloads layer 90.

FIG. 4 depicts a simplified view of the memory 28 in computersystem/server 12 according to embodiments of the present invention.Accordingly, some elements of the memory 28 are not shown so as not toobscure the figure. FIG. 4 shows that one example program module 42 is amanaged resource software application 96. The software application 96 isconfigured to manage resources. Example resources that can be(simultaneously) managed by the software application 96 as countableresources include main storage pages, allocation blocks in a filesystem, system control structures dedicated to represent a job or task,etc. For explanation purposes, random access memory (such as RAM 30) maybe utilized in some example scenarios for ease of understanding and notlimitation. FIG. 4 shows an example program/utility 40 which can be anoperating system, and various applications 410 can have jobs that needto use the managed resource. A job can be a task that runs on thecomputer system 12 (or another computer system) and needs to utilize themanaged resource to complete execution.

The managed resource software application 96 is configured to reserve aset amount of a resource for privileged users/jobs. In the case of acritical resource shortage, the managed resource software application 96allows analysis and shortage resolution by the privileged users. Themanaged resource software application 96 proposed approach can be usedfor any countable resource in both operating systems and applications,and for an example scenario the countable resource can be random accessmemory. As noted above, with this design there is no marking or poolingof the resource. This means that units of the resource itself have noindication (marking) that they belong to privileged or non-privilegedusers. Also, the units of the resource for use by the privileged usersare not tracked separately from those for non-privileged users(pooling). Instead, an object of a resource management class (PrivObj)is created to implement special form of resource counting according tothis invention. In one implementation, the software application 96 maybe representative of the functions of the PrivObj (privileged object) orof the PrivObj itself. This object has an entry in a table 404 for eachmanaged resource and is used for the following. The managed resourcesoftware application 96 is configured to manage the managed resource(e.g., RAM 30) such that part of each managed resource is reserved forthe privileged jobs by modifying the interpretation of the concept of“free resource”. The amount (of the managed resource, e.g., RAM 30)available for non-privileged jobs is total free minus amount set asidefor privileged jobs. For the given managed resource (e.g., RAM 30), themanaged resource software application 96 keeps track of the number/valueof the privileged resource (also referred to as the reserved resource)and the number/value of the unreserved resource. The managed resource isconsidered as having a reserved/privileged resource part and anunreserved resource part, and each part is a number.

The managed resource software application 96 can include an activationalgorithm that is defined to determine if privileged reservation shouldbe activated (or not) and determine the amount of the managed resourcereserved for privilege use. This activation algorithm is run at PrivObjcreation time and reset time. For example, the managed resource softwareapplication 96 is configured to check whether the amount of the resourceis too small for efficient management. The managed resource softwareapplication 96 determines that the amount of the resource is too smallif activation of the privilege protection by the managed resourcesoftware application 96 causes an immediate shortage, for example, suchthat currently running jobs would become stalled. The following is anexample process of the activation algorithm. The operating system orapplication makes a decision whether privilege protection will beactivated for a particular resource based on some resource-specificcriteria, for example, an Activation number.

X is the Activation number. The number of current free resource mustmeet or exceed this number (X) for privilege support to be activated forthis resource. Typically a small number free would mean no activationsince this may cause an immediate shortage. Given a resource, theimplementer must decide what this number(X) should be (and/or softwareapplication 96 is set in advance with the number X for a predefinedresource).

So given a resource, Y=total free resource (number), X=Activationnumber.

If Y>=X then;

Activate privilege support for this resource;

Else wait some time (several seconds) and try again.

The managed resource software application 96 includes logic to reset theresource counters when a configuration change is detected. The managedresource software application 96 includes resource counters that countthe amount of managed resource (which is a countable resource). Theresource counters are typically part of the operating system 40, and inone implementation, the software application 96 may include resourcecounters.

The managed resource software application 96 includes promotion logicwhich allows non-privileged jobs to consume privileged part of theresource when it advantageous to do so. The non-privileged job ispromoted when the software application 96 determines that non-privilegedjob is exiting the system (e.g., exiting the operating system 40 and/orexiting the managed resource) and will return the needed resource. Forexample, the managed resource software application 96 can determine thata non-privileged job is in a state of exiting the computer 12 (e.g.,exiting the managed resource, such as RAM 30). As one implementation tomake this determination, the managed resource software application 96can be called or invoked by the operating system 40 when the operatingsystem 40 recognizes that the non-privileged job has stalled but hascompleted a predefined amount of the job (e.g., at least 85%, 90%, 95%,98% of the job). Additionally, the managed resource software application96 may check (via the operating system 40) for stalled non-privilegedjobs that have completed a predefined amount of the job (e.g., at least85%, 90%, 95%, 98% of the job).

The managed resource software application 96 includes count managementlogic, and the count management logic is error tolerant (fuzzy) with abias always towards the privileged resource.

The managed resource software application 96 is configured to havecoexistence with old code levels which do not have support for theprivileged resource. The support (for managed resource) can be easilyswitched off when the system (e.g., computer 12 and/or operating system40) with an old code level joins a multi-system configuration (cluster)(e.g., other computers 12). This is possible because there is no markingnor pooling with the managed resource software application 96 but onlyinterpretation of resource counters (i.e., utilization of the value) atresource acquirement time.

The following is the definition of PrivObj class which is illustrated bymanaged resource software application 96. Also, the operations forintegrating this privileged support (for preventing and managing acritical resource) to be used with the operating system 40 and/or anapplication (such as applications 410).

FIG. 5 depicts example contents of the software application 96 accordingto embodiments of the present invention. As an example, the PrivObjmember data contents (e.g., of the managed resource software application96) include an example header 502 and a table entry 504 in the table404. The header 502 can include a version number of the object forupward compatibility and control flags. The control flags can include aprivileged protection is active flag, which indicates that theprivileged protection is on for the particular managed resource (e.g.,RAM). Another resource can have this flag not set, which indicates theprivileged protection is not active for that other resource. The controlflags can include a flag which indicates suspended due to an errorcondition, which means that the privileged protection has been stopped.The control flags can include a flag at least one of the resources isinactive, which means that if multiple different resources werepreviously being managed, at least one of the resources is not currentlybeing managed.

One table entry 504 is illustrated but it should be understood thatthere is an analogous table entry 504 for each protected/managedresource. Each table entry 504 can include different fields whichinclude PrivLimit, PrivFree, PromotableFree, and variousflags/indications.

The PrivLimit is a number (value) of resource originally reserved forprivileged users/jobs. Once the PrivLimit is set, this value does notchange unless the managed resource is reset or reconfigured. ThePrivLimit is a cap to PrivFree.

The PrivFree is a number (value) of the resource currently available forprivileged jobs. The PrivFree is reduced while a privileged job/user isusing part of the reserved resource in a shortage situation, and isincreased when a job/user (privileged or not privileged) finishes usingpart of the reserved resource. As per above statement, PrivFree iscapped by PrivLimit.

As seen in table entry 504, the PromotableFree field is some part ofPrivFree which can be handed out to non-privileged jobs when a shortageexists. This part (used as the PromotableFree field) can be a predefinedpercent of the PrivFree. The promotable resource is only handed out tojobs exiting the system and thereby returning the needed resource. Forexample, a non-privileged job may require more of the resource (e.g.,more megabytes of RAM 30) in the process of exiting the system, and themanaged resource software application 96 is configured to promote thenon-privileged job to the status of privileged such that thenon-privileged job can utilize the reserved resource in order tocomplete the job to exit the operating system 40 and to free theresource it used.

The various flags in the table entry 504 include the resource type flag,resource active flag, and resource shortage flag (used to issue variousinformational messages). The resource type field is an indication of thetype of resource being managed, such as, e.g., an indication of managingRAM 30. The resource active flag is an indication that management of theparticular resource is active. The resource shortage flag is anindication that there is a shortage of the managed resource.

There can be various member functions for the managed resource softwareapplication 96. For example, FIG. 6 depicts that the managed resourcesoftware application 96 can be and/or include PrivObj member functions602 according to embodiments of the present invention. The PrivObjmember functions 602 (of the software application 96) can includefunctions/operations such as Create_PRIVOBJ, Return_Privileged_Free,Return_Non_Privileged_Free, Increment_Privileged_Free_Count,Decrement_Privileged_Free, Return_Resource_Promotable,Reset_Resource(s), and Off_PrivObj. These example functions will bediscussed below.

In the managed resource software application 96, Create_PRIVOBJ is afunction that is configured to create the object and run a resourcealgorithm for each managed resource in order to determine if theprivileged resource reservation should be activated (or not) for eachresource that is to be managed. This activation algorithm interrogatescurrent resource usage and determines if privileged enforcement shouldbe activated. If enforcement would cause immediate shortage, thensupport will not be activated (i.e., the managed resource softwareapplication 96 will not manage this resource), and instead messages andrecommendations will be issued. In one implementation, an immediateshortage may be defined as any application (such as one or moreapplications 410) presently executing on the computer system 12 wouldimmediately stop functioning if the managed support of the softwareapplication 96 is initiated because the reserved amount of the managedresource (e.g., RAM 30) could not be reserved without interfering withthe present execution of the running application. Also, theresource/activation algorithms of Create_PRIVOBJ are configured todetermine the proper value for PrivLimit and PrivFree for each resource.It is noted that this same resource algorithm runs when and if theresource is reset due to a configuration change. PrivFree is typicallysome small fraction of total free.

In the managed resource software application 96, Return_Privileged_Freeis a function that returns the value (which is a number) in the table404 for PrivFree. For example, for a given resource type, theReturn_Privileged_Free function returns the amount reserved (i.e.,available) for privileged jobs (PrivFree).

In the managed resource software application 96,Return_Non_Privileged_Free is a function that returns the amount (value)of free resource available for non-privileged jobs. This value isobtained by taking total resource count free minus amount reserved forprivileged jobs (PrivFree). This calculation always assures that thereserved amount of the resource is available for privileged users, sothat the reserved resource is not allocated (given away) to thenon-privileged users.

In the managed resource software application 96,Increment_Privileged_Free_Count (PrivFree) by supplied value is toincrement the value of the PrivFree in table 404. When a non-privilegedjob needs to exit its operations (i.e., exit its use of the managedresource), the managed resource software application 96 is configured topromote the non-privileged job to a privileged job status and thensupply the promoted non-privileged job with a supplied value of reservedresource (which could be all or almost all of the reserved resource).The supplied value is the amount of reserved resource given and utilizedby a promoted non-privileged job. Accordingly, theIncrement_Privileged_Free_Count is a function configured to add thepreviously supplied value back to PrivFree such that return of thesupplied value can be accounted for. It is noted that the PrivFree cannever exceed the limit (i.e., PrivLimit) established at creation orreset time. A particular concept is that when a job (privileged joband/or non-privileged job) returns any amount of resource, theprivileged part of the resource is always replenished first. This istrue regardless of the privileged state of the job returning theresource. This bias towards privileged facilitates availability of theprivileged resource. For example, when promoted non-privileged jobreturns a resource, the software application 96 will replenish theprivileged part of the resource first.

In the managed resource software application 96, theDecrement_Privileged_Free is a function configured to decrement theprivileged free (PrivFree) count by the supplied value, when thesupplied value of the reserved/privileged resource is being given (i.e.,supplied) to the privileged job or the recently promoted non-privilegedjob (i.e., now with a privileged status). It is noted that if thedecrement (of the privileged free (PrivFree) count for the reservedamount of the resource) will cause the value to be less than zero, thenset PrivFree to zero. In other words, PrivFree can never be negativenumber because the amount of resource is not a negative value.

In the managed resource software application 96, theReturn_Resource_Promotable function is configured to, for a givenresource, return Boolean (e.g., true or false) denoting whethernon-privileged job is promotable or not. An example of when thenon-privileged job is not promotable is when this job is not exiting thesystem and therefore is not eligible to be promoted. In the managedresource software application 96, Reset_Resource(s) (all or a list ofresources) is a function configured to, given a specific resource orindication of all resources, reset the resource(s). Resetting theresource involves re-running the same resource activation algorithm usedat creation time to recalculate values of for the PrivLimit andPrivFree.

In the managed resource software application 96, Off_PRIVOBJ is afunction configured to turn off privileged support altogether.

The following is a scenario using RAM 30 as the managed resource beingmanaged by the managed resource software application 96. Accordingly,given the privileged support discussed herein example, operationsintegrating the privileged resource protection mechanism within a system(e.g., operating system 40) and/or application are depicted in a flowchart 700 in FIGS. 7A, 7B, and 7C.

At block 702, the code developer (or operator) needs to identify theresource(s) to protect and to design the activation algorithm(s) foreach resource (for PRIVOBJ::Create). The activation algorithm determinesif the current resource configuration (prior to privilege protectionaction) will support privileged protection. In the example, the managedresource software application 96 will provide privileged protection forRAM 30, along with other resources such as disk storage 34, etc. Ifprivileged protection is to be activated, the managed resource softwareapplication 96 is configured to then set PrivLimit and PrivFree values.These values are dependent on the total count of available resource andthe current free count for the resource. For example, it may be assumedthat the RAM 30 is 1 gigabyte (GB) (which is a countable resource). Inone implementation, the managed resource software application 96 isconfigured to reserve 10% of the managed resource, which means that thevalue of the PrivLimit is set to 100 megabytes (MB) of RAM 30, and thePrivFree is initially set to 100 MB, although PrivFree changes as theprivileged resource is allocated and returned from privilegedusers/jobs.

At block 704, the code developer needs to identify code paths in asystem (e.g., operating system 40) or application code where theresource (e.g., RAM 30) is acquired. A call to the appropriate method ofthe managed resource software application 96 will need to be inserted ateach code path identified in this way, before the resource can beactually allocated to the requestor. This call to the managed resourcesoftware application 96 will decide whether resource allocation ispermitted based on the current state of the caller (privileged vsnon-privileged) and the state of the managed resource. In oneimplementation, the managed resource software application 96 can deploya module (or script, plug-in, application program interface (API) etc.)to the operating system 40 such that the operating system 40 seamlesslyintegrates and/or calls the managed resource software application 96before allocating the managed resource (RAM 30) and when any amount ofthe managed resource is being returned. As an illustrative view, FIG. 8depicts a high-level diagram of the managed resource softwareapplication 96 individually providing privileged protection for variousmanaged resources (including RAM 30 as one of the managed resources)according to embodiments of the present invention.

At block 706, the managed resource software application 96 is configuredto check for job privileged state (or not privileged state) for a jobrequesting use or allocation of the managed resource. The managedresource software application 96 can add a check for job privilegedstate to the operating system 40 such that the managed resource softwareapplication 96 is called/invoked by the operating system 40 to checkwhether the job requesting the managed resource is a privileged job or anon-privileged job. The managed resource software application 96recognizes if a job is a privileged job or a non-privileged job bychecking the table 404 because privileged jobs are predefined inadvance.

At block 708, if the job is not privileged, then the managed resourcesoftware application 96 invokes Return_Non_Privileged_Free to determineif free resource exists for the managed resource. If the free resourceexists, managed resource software application 96 permits thenon-privileged job to consume the managed resource and continue at block710. The managed resource software application 96 could instruct theoperating system 40 to permit the non-privileged job to consume the freeportion of the managed resource (e.g., RAM 30). The free portion of themanaged resource does not include the reserved amount of the managedresource, which was 100 MB of RAM 30 in the example scenario.

At block 712, if the job is not privileged and if there is no freeresource available of the managed resource, the managed resourcesoftware application 96 is configured to determine if the exiting jobmay be temporarily promoted by invoking Return_Resource_Promotable. Ifthe non-privileged job is not promotable (because job is not exiting theoperating system), the managed resource software application 96 isconfigured to run code which handles “out of resource” condition atblock 714. One skilled in the art understands code handling an out ofresource condition is designed to close, suspend, stop, purge, and/orabort the current job that is out of the resource. The softwareapplication 96 and/or the operating system 40 can have the code to stopthe current job that is out of the available managed resource, and thecode closing the job can utilize the reserved amount (e.g., a portion ofthe reserved amount) of the managed resource in order to close the job.

At block 716, if the managed resource software application 96 determinesthat non-privileged job is promotable to privileged status because thejob is exiting the operating system, the managed resource softwareapplication 96 is configured to promote the job and supply the job withthe requested resource needed to exit. Also, the managed resourcesoftware application 96 invokes Decrement_Privileged_Free in order toreduce the value of PrivFree by the supplied value of the reservedresource given to the non-privileged job that was just promoted.

At block 718, if the job is privileged, the managed resource softwareapplication 96 is configured to invoke Return_Privileged_Free todetermine the value of the reserved resource that is actually free, andthis value is PrivFree in the table 404. At block 720, if the value ofthe available reserved resource (PrivFree) is greater than or equal tothe amount requested by the privileged job, the managed resourcesoftware application 96 is configured to supply the requested amount ofthe reserved resource to the privileged resource (i.e., allocate theresource to the job). Additionally, the managed resource softwareapplication 96 is configured to invoke Decrement_Privileged_Free by theamount of the supplied value of the resource.

At block 722, if no privileged/reserved resource is available, then themanaged resource software application 96 is configured to run code whichhandles “out of resource” condition.

At block 724, the code developer needs to identify code paths in asystem (e.g., operating system 40) or application code where theresource (previously used by a job (privileged or non-privileged)) isreturned and to invoke Increment_Privileged_Free_Count (i.e., incrementPrivFree) for the resource being returned regardless of the job'sprivileged status. Code path identification requires a knowledge of therelevant operating system or application code. It should be appreciatedthat code path identification is a one-time action to find and changethe code and it is a job for a software developer. This bias towardsprivileged should always assure privileged resource availability whenneeded. Also, this bias to privileged allows promoted jobs to replenishthe privileged resource. It is noted that resource management countersmay be inaccurate (fuzzy), but will always bias towards privileged.Also, PrivFree is designed to never exceed PrivLimit even when the valueof PrivFree is being incremented as jobs return their use (amount) ofthe managed resource because PrivFree is capped at the value ofPrivLimit.

At block 726, the code developer needs to identify code paths where thetotal resource counters are increased and/or decreased in the operatingsystem 40. An increase or decrease of resource counters of the managedresource typically occurs because of a configuration change. Forexample, assume that more of the managed resource has just beeninstalled (e.g., more RAM installed), and this results in an increase inthe total amount of the resource. At these locations, the code path willneed to be changed to invoke the Reset_Resource method of the managedresource software application 96. Just as discussed above at the PrivObjcreation time, the activation algorithm of the managed resource softwareapplication 96 will be re-run and will determine if privilegedprotection is warranted and should be activated. If the privilegedprotection should be activated, the managed resource softwareapplication 96 will set PrivLimit and PrivFree to proper values.

At block 728, when a system (another/different operating system) with adown level code joins the configuration (with the operating system 40)and the down level code does not have support for privileged resources,the managed resource software application 96 is configured to invokeOff_PRIVOBJ. This is the only action needed. As such, there is norequirement for un-marking the privileged resource since the actualresource was never marked nor pooled. The code in the up-level releaseOff_PRIVOBJ (of the software application 96) does not need to know ifsupport was activated or not. The code in PrivObj method (of softwareapplication 96) encapsulates all the support required whether resourcereservation was activated or not. Each method will return correctinformation regardless if support is on or off. For example when off,Return_Non_Privileged_Free would just return total free and not subtractPrivFree since PrivFree is no longer pertinent. It is noted that theremay be privileged jobs currently active when the down-level systemjoins, but these privileged jobs currently active are marked in a mannerthat does not affect down level code. Returning privileged resourceturns into a no-op.

It should be recognized that the methods of the software application 96are not limited to the type of resource being managed, as long as themanaged resource is countable. This makes methods discussed hereinextendable to other operating systems and applications.

FIG. 9 is a flow chart 900 of a computer-implemented method for resourceallocation of a managed resource (such as RAM 30, system storage 34,etc.) according to embodiments of the present invention. The embodimentsare executed by processing circuitry, e.g., processing units, of themultiprocessor computer system 12. The managed resource softwareapplication 96 is configured to individually manage multiple resourcessimultaneously and execute the flow in FIG. 9. It should be appreciatedthat embodiments of the invention apply to any resource managed by acomputer system (either by the operating system or by an application).

At block 902, the software application 96 of computer system 12 isconfigured to (initially) set a reserved amount (e.g., PrivLimit) of themanaged resource (e.g., RAM 30) to be available for a privileged status(i.e., privileged jobs), such that there is an unreserved amount(non-privileged free value) of the managed resource.

At block 904, in response to a non-privileged job needing more of theunreserved amount of the managed resource than what is available, thesoftware application 96 of computer system 12 is configured to determinewhether the non-privileged job is promotable to a privileged status(i.e., whether the non-privileged job should be promoted to a privilegedjob).

At block 906, in response to the non-privileged job not being promotableto the privileged status, the software application 96 of computer system12 is configured to prevent the non-privileged job from accessing thereserved amount of the managed resource.

At block 908, in response to the non-privileged job being promotable tothe privileged status (i.e., promoted to privileged job), the softwareapplication 96 of computer system 12 is configured to permit thenon-privileged job to utilize the reserved amount of the managedresource (as though it is a privileged job).

The managed resource is a countable item, such that the managed resourcehas a total value (and/or approximated/estimated total value) which canbe identified. The reserved amount is a value (e.g., PrivLimit in thetable 404) denoting how much of the total value is to be available forthe jobs with privileged status. As an example, the PrivLimit can be 100MB (and/or a predefined value) of RAM 30 when the total value of RAM 30is 1 GB.

The reserved amount is a percentage of the total value of the managedresource. For example, the reserved amount can be set as 10% of thetotal value of the managed resource, and can be 100 MB if the totalvalue is 1 GB. The unreserved amount can be 900 MB (or (90%) of thetotal value 1 GB).

In response to the non-privileged job needing more of the unreservedamount of the managed resource than what is (currently) available(assume that only 500 MB of the unreserved amount is available becausethe other 400 MB is used by one or more other non-privileged jobs), thesoftware application 96 is configured to determine whether thenon-privileged job is promotable to the privileged status whichcomprises: determining that the non-privileged job is stalled becausemore (e.g., the non-privileged job needs 50 MB more of the managedresource RAM 30) of the unreserved amount of the managed resource is notavailable (i.e., the software application 96 can receive a trigger fromthe operating system 40 that the non-privileged job is stalled and/orrunning so slowly that it is considered stalled), determining that thenon-privileged job is in a stage of exiting use of the unreserved amountof the managed resource, and determining that the non-privileged job ispromotable to the privileged status because the non-privileged is in thestage of exiting, thereby promoting the non-privileged job to theprivileged status such that the reserved amount of the managed resourceis useable by the non-privileged job. The software application 96 cancommunicate with the operating system 40 to recognize that thenon-privileged job is in the stage of exiting the managed resourcebecause the non-privileged job is executing code (and/or attempting toexecute code) indicative of exiting, is over a predefinedpercentage/amount complete, etc. Also, the software application 96 canbe triggered by the operating system 40 that the non-privileged job isin the stage of exiting the managed resource (RAM 30) and/or operatingsystem.

The reserved amount is a limit value (PrivLimit) that denotes a numberof the managed resource originally reserved for the privileged status,and the limit value is not to be exceeded. A free value (PrivFree) is anumber of the reserved amount currently available for the privilegedstatus (the free portion of the PrivLimit that is not being utilized andavailable for use by privileged job and/or promoted non-privilegedjobs), such that the free value originally equals the limit value of thereserved amount. In one implementation, the free value must bemaintained at and/or not go above a predefined value/percentage of thePrivLimit. Continuing the previous scenario for RAM 30, if the PrivLimitis 100 MB then PrivFree is not allowed to exceed 100 MB. PrivFree isdecremented when there is a resource shortage, and privileged jobs areallowed to consume the reserved portion of the resource. The PrivFreecan reach 0 MB but not a negative number. Promoted non-privileged jobscan cause PrivFree to be decreased, but typically promoted jobs are notallowed to completely deplete PrivFree. For example, non-privileged jobswill not be allowed to be promoted when PrivFree falls below 10 MB.

Each time the reserved amount is given at a supplied value (whatever isto be utilized) for use by any given job at the privileged status, thefree value (PrivFree) is reduced by the supplied value, and the anygiven job comprises a selection from the group consisting of thenon-privileged job at the privileged status and/or a privileged job.Each time the any given job at the privileged status has completed usingthe reserved amount, the free value is increased by the supplied valueup to the limit value (PrivLimit). Each time a given non-privileged jobhas completed using the unreserved amount, the free value (PrivFree) isalso increased by a corresponding value that has been relinquished bythe given non-privileged job up to the limit value (PrivLimit).

The present invention may be a system, a method, and/or a computerprogram product at any possible technical detail level of integration.The computer program product may include a computer readable storagemedium (or media) having computer readable program instructions thereonfor causing a processor to carry out aspects of the present invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, configuration data for integrated circuitry, oreither source code or object code written in any combination of one ormore programming languages, including an object oriented programminglanguage such as Smalltalk, C++, or the like, and procedural programminglanguages, such as the “C” programming language or similar programminglanguages. The computer readable program instructions may executeentirely on the user's computer, partly on the user's computer, as astand-alone software package, partly on the user's computer and partlyon a remote computer or entirely on the remote computer or server. Inthe latter scenario, the remote computer may be connected to the user'scomputer through any type of network, including a local area network(LAN) or a wide area network (WAN), or the connection may be made to anexternal computer (for example, through the Internet using an InternetService Provider). In some embodiments, electronic circuitry including,for example, programmable logic circuitry, field-programmable gatearrays (FPGA), or programmable logic arrays (PLA) may execute thecomputer readable program instruction by utilizing state information ofthe computer readable program instructions to personalize the electroniccircuitry, in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the blocks may occur out of theorder noted in the Figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

The descriptions of the various embodiments of the present inventionhave been presented for purposes of illustration, but are not intendedto be exhaustive or limited to the embodiments disclosed. Manymodifications and variations will be apparent to those of ordinary skillin the art without departing from the scope and spirit of the describedembodiments. The terminology used herein was chosen to best explain theprinciples of the embodiments, the practical application or technicalimprovement over technologies found in the marketplace, or to enableothers of ordinary skill in the art to understand the embodimentsdescribed herein.

1-8. (canceled)
 9. A computer program product for resource allocation ofa managed resource, the computer program product comprising a computerreadable storage medium having program instructions embodied therewith,wherein the computer readable storage medium is not a transitory signalper se, the program instructions readable by a computer to cause thecomputer to perform a method comprising: setting, by the computer, areserved amount of the managed resource to be available for a privilegedstatus, such that there is an unreserved amount of the managed resourceto be available for a non-privileged status; in response to anon-privileged job needing more of the unreserved amount of the managedresource than what is available, determining whether the non-privilegedjob is promotable to the privileged status; in response to thenon-privileged job not being promotable to the privileged status,preventing the non-privileged job from accessing the reserved amount ofthe managed resource; and in response to the non-privileged job beingpromotable to the privileged status, permitting the non-privileged jobto utilize the reserved amount of the managed resource.
 10. The computerprogram product of claim 9, wherein the managed resource is a countableitem, such that the managed resource has a total value.
 11. The computerprogram product of claim 10, wherein the reserved amount is a valuedenoting how much of the total value is to be available for theprivileged status.
 12. The computer program product of claim 10, whereinthe reserved amount is a percentage of the total value of the managedresource.
 13. The computer program product of claim 9, wherein inresponse to the non-privileged job needing more of the unreserved amountof the managed resource than what is available, determining whether thenon-privileged job is promotable to the privileged status comprises:determining whether the non-privileged job is stalled because more ofthe unreserved amount of the managed resource is not available;determining whether the non-privileged job is in a stage of exiting useof the unreserved amount of the managed resource; and determiningwhether the non-privileged job is promotable to the privileged statusbecause the non-privileged job is in the stage of exiting, therebypromoting the non-privileged job to the privileged status such that thereserved amount of the managed resource is useable by the non-privilegedjob.
 14. The computer program product of claim 9, wherein the reservedamount is a limit value that denotes an amount of the managed resourceoriginally reserved for the privileged status; and wherein a free valueis a portion of the reserved amount currently available for theprivileged status, such that the free value originally equals the limitvalue of the reserved amount.
 15. The computer program product of claim14, wherein, each time the reserved amount is given at a supplied valuefor use by a given job at the privileged status, the free value isreduced by the supplied value, the given job comprising a selection fromthe group consisting of a non-privileged job at the privileged statusand a privileged job; and wherein, each time the given job at theprivileged status has completed using the reserved amount, the freevalue is increased by the supplied value up to the limit value.
 16. Thecomputer program product of claim 15, wherein, each time a givennon-privileged job has completed using the unreserved amount, the freevalue is increased by a corresponding value that has been relinquishedby the given non-privileged job up to the limit value.
 17. A computerfor resource allocation of a managed resource, the computer comprising:a processing circuit; and a storage medium readable by the processingcircuit and storing instructions that, when executed by the processingcircuit, cause the processing circuit to perform a method comprising:setting, by the processing circuit, a reserved amount of the managedresource to be available for a privileged status, such that there is anunreserved amount of the managed resource to be available for anon-privileged status; in response to a non-privileged job needing moreof the unreserved amount of the managed resource than what is available,determining whether the non-privileged job is promotable to theprivileged status; in response to the non-privileged job not beingpromotable to the privileged status, preventing the non-privileged jobfrom accessing the reserved amount of the managed resource; and inresponse to the non-privileged job being promotable to the privilegedstatus, permitting the non-privileged job to utilize the reserved amountof the managed resource.
 18. The computer of claim 17, wherein themanaged resource is a countable item, such that the managed resource hasa total value.
 19. The computer of claim 18, wherein the reserved amountis a value denoting how much of the total value is to be available forthe privileged status.
 20. The computer of claim 18, wherein thereserved amount is a percentage of the total value of the managedresource.